<script setup>
import { getChannelService } from '@/api/atricle.js'
import { ref, defineProps, defineEmits } from 'vue'
const channelist = ref([])
const getchannelist = async () => {
  const res = await getChannelService()
  channelist.value = res.data.data
}
defineProps({
  modelValue: {
    type: [Number, String]
  },
  width: {
    type: String
  }
})
const emit = defineEmits(['update:modelValue'])
getchannelist()

</script>

<template>
  <el-select placeholder="请选择" :style="{width}"
    @update:modelValue="emit('update:modelValue', $event)" :modelValue="modelValue">
    <el-option v-for="item in channelist " :key="item.id" :label="item.cate_name"
      :value="item.id"></el-option>
  </el-select>
</template>